﻿<%@ Import Namespace="Webdiyer.WebControls.Mvc"%>
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PagedList<MvcProject.Models.ProjectInfo>>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    项目列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <a href="ProjectInfo/Create">新增项目</a>
    <table>
        <tr>
            <th>
                项目名称
            </th>
            <th>
                项目状态
            </th>
            <th>
                创建时间
            </th>
            <th>
            </th>
        </tr>
        <% if (Model != null)
               foreach (var item in Model)
               { %>
        <tr>
            <td>
                <%=Html.ActionLink(item.ProjectName, "Details", new { id = item.ProjectId })%>
            </td>
            <td>
                <%=Html.Encode(item.ProjectStatus)%>
            </td>
            <td>
                <%=Html.Encode(item.CreateDate.HasValue ? item.CreateDate.Value.ToShortTimeString():"")%>
            </td>
            <td>
                <%: Html.ActionLink("编辑", "Edit", new { id = item.ProjectId })%>
                |
                <%: Html.ActionLink("详细信息", "Details", new { id = item.ProjectId },new{ target="_blank"})%>
                |
                <%: Html.ActionLink("删除", "Delete", new { id = item.ProjectId })%>
            </td>
        </tr>
        <% } %>
    </table>
<%=Html.Pager(Model, new PagerOptions { PageIndexParameterName = "page", NextPageText = "下一页", LastPageText = "尾页", PrevPageText = "上一页", FirstPageText="首页" })%>
</asp:Content>
